﻿using System.Data;
using System.Data.SqlClient;


namespace AFT.Parking.Data
{
    public class ExecuteSql
    {
        public static IDataReader ExecuteDataReader(string connName, string cmdText, CommandType cmdType, params SqlParameter[] commandParameters)
        {
            return SqlHelper.ExecuteDataReader(connName, cmdText, cmdType, commandParameters);
        }

        public static int ExecuteNonQuery(string connName, string cmdText, CommandType cmdType, params SqlParameter[] commandParameters)
        {
            return SqlHelper.ExecuteNonQuery(connName, cmdText, cmdType, commandParameters);
        }

        public static object ExecuteScalar(string connName, string cmdText, CommandType cmdType, params SqlParameter[] commandParameters)
        {
            return SqlHelper.ExecuteScalar(connName, cmdText, cmdType, commandParameters);
        }
    }
}
